# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=otpclient
pkgver=4.0.2
pkgrel=0
pkgdesc="Simple GTK+ client for managing TOTP and HOTP"
url="https://github.com/paolostivanin/OTPClient"
license="GPL-3.0-or-later"
arch="all"
options="!check" # no test suite
makedepends="
	cmake
	gtk+3.0-dev
	jansson-dev
	libcotp-dev
	libgcrypt-dev
	libpng-dev
	libqrencode-dev
	libsecret-dev
	libzip-dev
	protobuf-c-dev
	protobuf-dev
	samurai
	zbar-dev
	"
subpackages="$pkgname-doc"
source="https://github.com/paolostivanin/OTPClient/archive/v$pkgver/OTPClient-$pkgver.tar.gz"
builddir="$srcdir/OTPClient-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e11a191e8e2820d59f2681e038a20c25cfcdddd21a4a172ed09977741b4f93bcf5145aad7a84fbbf9a0e4187badc96f542b23fc12a088f3a6edab0b484fa44eb  OTPClient-4.0.2.tar.gz
"
